package com.attendance.service.impl;

import com.attendance.entity.Report;
import com.attendance.mapper.ReportMapper;
import com.attendance.service.ReportService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {

    @Resource
    private ReportMapper mapper;

    @Override
    public IPage<Report> selectPage(Page<Report> page) {
        return mapper.selectPage(page);
    }

    @Override
    public int insert(Report entity) {
        return mapper.insert(entity);
    }

    @Override
    public List<Report> selectAllByTeamId(Integer team_id) {
        return mapper.selectAllByTeamId(team_id);
    }

    @Override
    public int deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public int updateById(Report report) {
        return mapper.updateById(report);
    }

    @Override
    public Report selectById(Integer id) {
        return mapper.selectById(id);
    }
}
